//
//  MCFreightModel.swift
//  StoreManage
//
//  Created by MC on 2018/9/20.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCFreightModel: NSObject {

    @objc var isShow = false  // 是否展示不配送区域
    @objc var b = false  

    
    @objc var name : String = "" // 模板名称
    
    @objc var freightTemplateId : NSNumber = 0   // 运费模板Id
    
    @objc var defaultFreight : NSNumber = 0      // 默认运费
    
    @objc var nonDistributionModels : [MCChooseAreaModel] = [MCChooseAreaModel]()

    
    @objc var cellHeight : CGFloat = 97
    
    @objc var nonDistributionList : NSArray = NSArray() {
        didSet {
            let arrayM = NSMutableArray()
            
            for item in nonDistributionList {
                let model = MCChooseAreaModel()
                model.setValuesForKeys(item as! [String:Any])
                arrayM.add(model)
                
                cellHeight += (model.allCitysHeight + 10)
            }
            
            nonDistributionModels = arrayM as! [MCChooseAreaModel]
        }
    }
    

    
    override func setValue(_ value: Any?, forUndefinedKey key: String) { }
}
